#ifndef PINS_H
#define PINS_H

#include <inttypes.h>
#include "Config.h"
#include "digital_pins.h"


/****************************************************************************************
*
* PINS CONFIG 
*
****************************************************************************************/

// PORT A
#define X_STEP_PIN      0	
#define Y_STEP_PIN      1	
#define Z_STEP_PIN      2	
#define E1_STEP_PIN     3	
#define E2_STEP_PIN		4	
#define SF_STOP_PIN		5	
#define SD_EN_PIN		6
#define SD_SS_PIN		7

// PORT B
#define SPI_SS_PIN		8
#define AUX3_PIN		8
#define SPI_SCK_PIN		9
#define SPI_MOSI_PIN	10
#define SPI_MISO_PIN	11
#define AUX0_PIN		12
#define FAN1_PIN		13
#define FAN2_PIN		14
#define E1_DIR_PIN		15	

// PORT C
#define X_ENABLE_PIN    16	
#define Y_ENABLE_PIN    17	
#define Z_ENABLE_PIN    18	
#define E1_ENABLE_PIN   19	
#define E2_ENABLE_PIN	20	
#define E_HALF_PIN		21	
#define SD_CD_PIN		22	
#define SD_WP_PIN		23

// PORT D
#define X_DIR_PIN       24	
#define Y_DIR_PIN       25	
#define RXD1_PIN		26	
#define TXD1_PIN		27	
#define E2_DIR_PIN		28	
#define X_HALF_PIN		29	
#define Y_HALF_PIN		30	
#define Z_HALF_PIN		31	

// PORT E
#define PDI_PIN			32
#define PDO_PIN			33
#define Z_DIR_PIN		34	
#define SW_BED_PIN		35	// Hard coded pwm
#define SW_EXT1_PIN		36	// Hard coded pwm
#define SW_EXT2_PIN		37	// Hard coded pwm
#define AUX1_PIN		38
#define CONTROL_BUTTON_PIN  38	// Hard coded input
#define AUX2_PIN		39

// PORT F
#define BED_THERM_PIN	40
#define E1_THERM_PIN	41
#define E2_THERM_PIN	42
#define STRMON_PIN		43
#define TCK_PIN			44
#define TMS_PIN			45
#define TDO_PIN			46
#define TDI_PIN			47

// PORT G

#define X_LIMIT_PIN     48
#define Y_LIMIT_PIN     49
#define Z_LIMIT_PIN     50
#define AUX_PG4_PIN		51
#define AUX_PG3_PIN		52

// HARD CODED ANALOG INPUTS
#define TEMP_BED_PIN        0   // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder)
#define TEMP_EXT1_PIN		1
#define TEMP_EXT2_PIN		2	

//List of pins which is free to change

#endif 

